1. Field of the Invention
The present invention relates to an editing method and an editing apparatus for editing a picture signal that has been compression-encoded with for example MPEG method.
2. Description of the Related Art
In recent years, MPEG (Moving Picture Experts Group) method has been widely used as an inter-picture compression encoding method. With a compression-encoding method such as the MPEG method, a record medium can be effectively used. When a picture signal that has been encoded by the MPEG method is edited by an editing system, a decoded picture signal and an external picture signal are connected. The resultant signal is encoded with the MPEG method and then recorded on a record medium. When a video signal recorded on another record medium is dubbed by a recorder, a reproduction signal of the record medium is decoded and then re-encoded.
In the MPEG method, there are three picture types that are referred to as I, P, and B pictures. When an I picture (Intra-coded picture) is encoded, only information thereof is used. Thus, an I picture can be decoded with only information thereof. When a P picture (Predictive-coded picture) is encoded, as a predictive picture (a reference picture for obtaining a difference), an I picture and a P picture that have been decoded are used. The difference between the current P picture and a predictive picture that has been motion-compensated is encoded. Alternatively, the current P picture is encoded without obtaining the difference. One of these methods is selected for each macro block so that a higher effect is obtained. When a B picture (Bidirectionally predictive-coded picture) is encoded, three types of predictive pictures (reference pictures) are used. The first predictive picture is an I picture or a P picture that has been decoded before the current B picture. The second predictive picture is an I picture or a P picture that has been decoded after the current B picture. The third predictive picture is an interpolated picture created by the first predictive picture and the second predictive picture. The difference between the current B picture and each of the predictive pictures that have been motion-compensated is encoded. Alternatively, the current B picture is intra-encoded. One of the two methods is selected for each macro block so that a higher effect is obtained.
Thus, there are four macro block types that are an intra-frame encoded macro blocks, forward inter-frame predictive macro blocks (for predicting a future macro block with a past macro block), backward inter-frame macro blocks (for predicting a past macro block with a future macro block), and bidirectional macro blocks (for predicting a current macro block with both a future macro block and a past macro block). An I picture contains only intra-frame encoded macro blocks. A P picture contains inter-frame encoded macro blocks and forward inter-frame predictive macro blocks. A B picture contains all four types of macro blocks.
In the MPEG method, a GOP (Group Of Pictures) structure that is a group of a plurality of pictures has been defined so as to perform a random-access operation. In the MPEG method, it is defined that the first picture of a GOP should be an I picture and that the last picture thereof should be an I picture or a P picture. Moreover, in the MPEG method, it is also defined that a structure for requiring a prediction with the last I or P picture of the preceding GOP is permitted. A GOP that can be decoded without need to use the preceding GOP is referred to as closed GOP. When edited results of pictures should be accurate, the closed GOP structure is often used.
In the MPEG method, since pictures are encoded with a frame correlation of each GOP, when an MPEG bit stream is edited, there is a restriction. In other words, when an end of a closed GOP matches an edit point, no problem takes place. However, the length of one GOP is normally 0.5 seconds that is too long as an edit point. Thus, it is preferable to edit a stream in an accuracy of one frame (picture).
When one of two MPEG video streams is switched over to the other at an edit point placed at a frame, phases of two streams connected are unknown. In the case of a GPO that completely stores a GOP structure without an edit point, pictures can be directly decoded without need to perform the edit point process.
When a GOP structure is not stored due to a presence of an edit point, a problem will take place. In a stream placed before an edit point, data placed after the edit point of the GOP is discarded. In a stream placed after an edit point, data placed before the edit point is discarded. When the remaining two streams with the edit point are decoded, data in the vicinity of the edit point of the two streams is treated as a new GOP. Thus, when the new GOP does not contain an I picture as a predictive reference picture, the GOP cannot be decoded. In this case, to allow the edited bit stream to be decoded, the bit stream is MPEG-decoded to a base band signal and then re-encoded to a bit stream.
The picture type of the first picture of the new GOP is changed to an I picture. With reference to the I picture, the picture type of another picture can be defined. In other words, when a non-edited GOP is decoded. The picture type of the first picture of the GOP is changed to an I picture. With the I picture, the picture type of another picture is re-defined and re-encoded. Consequently, a new GOP is formed.
However, in such an edit point processing method, depending on the phase of an edit point, a B picture may be changed to an I picture. Generally, although the data amount of a B picture is smaller than that of an I picture, the picture quality of the decoded picture of the former is lower than that of the latter. Thus, in the re-encoding process of which a deteriorated picture is used as an I picture, the picture quality of the re-encoded picture is inferior to the picture quality of the original picture.
In addition, since the sequence of the picture types of re-encoded stream is different from that of the original stream, encoding information used in the decoding process of the original stream cannot be used. Generally, whenever an editing process including a switching operation is performed, the encoding process and decoding process are repeated. Normally, when the decoding process and the encoding process are performed between a base band signal and a bit stream, picture quality of the resultant pictures largely deteriorates. With encoding information obtained in the decoding process of a stream, deterioration of picture quality in the vicinity of an edit point due to a decoding process and an encoding process can be minimized. The encoding information contains picture type, moving vector, and quantizing scale. When the picture type before the editing process is performed varis from the picture type after the editing process is performed, the encoding information cannot be used for the re-encoding process. Thus, the picture quality largely deteriorates.
Therefore, an object of the present invention is to provide an editing method and an editing apparatus that suppress picture quality from deteriorating in the case that encoded data (stream) is edited.
A first aspect of the present invention is a picture editing apparatus, comprising a designating means for designating an edit point, a controlling means for causing a picture encoded as a predictive reference picture at least before the picture is edited to be encoded as a predictive reference picture after the picture is edited, and a changing means for changing a predictive structure for a picture that is not the predictive reference picture placed before or after the edit point under the control of said controlling means.
A second aspect of the present invention is a picture editing method, comprising the steps of (a) designating an edit point, (b) causing a picture encoded as a predictive reference picture at least before the picture is edited to be encoded as a predictive reference picture after the picture is edited, and (c) changing a predictive structure for a picture that is not the predictive reference picture placed before or after the edit point under the control of step (b).
Before and after an editing process is performed, the interval of predictive reference pictures of encoded data is not varied. Thus, when a decoding process and a re-encoding process are performed, the number of calculations can be decreased. In addition, encoding information used in the decoding process can be re-used. Thus, the picture quality of pictures that have been edited can be improved.
These and other objects, features and advantages of the present invention will become more apparent in light of the following detailed description of a best mode embodiment thereof, as illustrated in the accompanying drawings.